import * as uuid from 'uuid'
export class CodeGenerator {

    private static readonly chars: number[] = [0,1,2,3,4,5,6,7,8,9]

    public static generateNumOf(len: number): string{
        let codes:string=""

        for(let i = 0;i<len;i++){
           codes+= CodeGenerator.chars[Math.floor(Math.random()*CodeGenerator.chars.length)]
        }
        return codes;
    }

    public static generateUUID():string{
        return uuid.v4();
    }
}